<?php
/**
 * Created by PhpStorm.
 * User: wangjiangtao
 * Date: 2022/7/7
 * Time: 18:41
 */

namespace App\Modules\Popularize\Services;


use App\Modules\Popularize\Platform\PlatformInterface;

class PopularizeService
{

    private $platfrom;

    public function __construct(PlatformInterface $platform)
    {
        $this->platfrom = $platform;
    }

    /**
     * 激活
     * @return bool
     */
    public function actviteEvent(){
        return $this->platfrom->active();
    }

    /**
     * 注册
     * @return bool|null
     */
    public function registerEvent():?bool{
        return $this->platfrom->regist();
    }
    /**
     * 付费
     * @return bool|null
     */
    public function payEvent($amount = 0):?bool{
        return $this->platfrom->pay($amount);
    }

}
